window['query'] = function(request, response) {
	chrome.tabs.getSelected(null, function(tab) {
		if (tab.url.indexOf('http')) {
			response({ msg: chrome.i18n.getMessage('invalidUrl') + ': ' + tab.url });
		} else {
			chrome.tabs.sendRequest(tab.id, request, response);
		}
	});
}
